laravel createmany example

66

laravel createmany example -

$post = Post::find(1);

$post->comments()->createMany([
    ['message' => 'A new comment.'],
    ['message' => 'Another new comment.'],
]);

Comments

Submit
0 Comments